package org.example.command;

import org.example.editor.Editor;

import java.util.Scanner;


public class CloseFileCommand implements Command {
    private Editor editor;
    private Integer fileNumber;
    private Scanner scanner;

    public CloseFileCommand(Editor editor, Integer fileNumber, Scanner scanner) {
        this.editor = editor;
        this.fileNumber = fileNumber;
        this.scanner = scanner;
    }

    @Override
    public void excute() {
        editor.closeFile(fileNumber,scanner);
    }
}
